const list = document.getElementById('list');
const items = ['Item 1', 'Item 2', 'Item 3'];

for (let i = 0; i < items.length; i++) {
  const listItem = document.createElement('li');
  listItem.textContent = items[i];
  list.appendChild(listItem);
}